package cn.itcast.order.client;

import cn.itcast.order.client.fallback.UserClientFallbackFactory;
import cn.itcast.order.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author xph
 * @Date 2022/8/9 11:06
 * @Description: user-service的feignClient
 */

@FeignClient(value = "user-service",fallbackFactory = UserClientFallbackFactory.class)
public interface UserClient {

    @GetMapping("/user/{id}")
    User queryById(@PathVariable("id") Long id);

}
